package com.it.biz.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.it.biz.GradeBiz;
import com.it.dao.mapper.GradeMapper;
import com.it.pojo.Grade;
import com.it.pojo.GradeExample;
import com.jkoss.tool.Page;

@Service("gradeService")
public class GradeBizImp implements GradeBiz{
	@Resource
	private GradeMapper gradeDao;
	//删除成绩数据数据
	@Override
	public int deleteByExample(GradeExample example) {
		// TODO Auto-generated method stub
		return gradeDao.deleteByExample(example);
	}
	//根据主键删除成绩信息
	@Override
	public int deleteByPrimaryKey(Integer gid) {
		// TODO Auto-generated method stub
		return gradeDao.deleteByPrimaryKey(gid);
	}
	//添加成绩
	@Override
	public int insert(Grade record) {
		// TODO Auto-generated method stub
		return gradeDao.insert(record);
	}

//	@Override
//	public List<Grade> selectByExample(GradeExample example) {
//		// TODO Auto-generated method stub
//		return gradeDao.selectByExample(example);
//	}
	//根据主键更新成绩信息
	@Override
	public int updateByPrimaryKey(Grade record) {
		// TODO Auto-generated method stub
		return gradeDao.updateByPrimaryKey(record);
	}
	//分页查询成绩
	@Override
	public List<Grade> findGrade(Page page) {
		return gradeDao.findAll(page);
	}
	//分页查询成绩
	@Override
	public List<Grade> selectByExample(Page<Grade> page, GradeExample example) {
		return gradeDao.findAll(page);
	}
	//根据主键信息查询单条数据
	@Override
	public Grade selectByPrimaryKey(Integer gid) {
		// TODO 自动生成的方法存根
		return gradeDao.selectByPrimaryKey(gid);
	}

}
